<?php

require __DIR__.'/../../../vendor/autoload.php';


use Gateway\app\non_mainland_cn2\Id_nameRequest;
use Gateway\ESGateway;
use Gateway\JSONUtil;
use Gateway\Log;


$appCode = "d2808c1338ce01f3e3efdb486f9effb9";
$algo = "3";
$key = "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEhdQdw6uTGz+X4e+/eGpu4dcKrfrjQAe0tTQyn6TuKBobcsUsESkx9jcCeG4cpuxmN8jNeDAZsbTujNLD/aYl2g==";
$esGateway = new ESGateway($appCode, $algo, $key);

$id_name_request = new Id_nameRequest();
$id_name_request->nation = "CHN";
$id_name_request->idType = "3";
$id_name_request->name = "李晨";
$id_name_request->idNO = "H60511121";

$gatewayResponse = $esGateway->sendToGateWay(Id_nameRequest::$act,$id_name_request->toJsonStr());
Log::DEBUG("服务器返回数据：".$gatewayResponse->toJsonStr());
if ($gatewayResponse->bizContent != null) {
    Log::DEBUG("业务数据为：".$gatewayResponse->bizContent);
    $rsp = JSONUtil::fromJsonStr($gatewayResponse->bizContent);
}
